<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var info = {
            name:'项羽',
            level:18,
            country:'楚',
            sex:true
        }
        //console.log(info.name);
        //console.log(info.name);

        //遍历对象
        //语法结构:自己总结、
         for (var k in info){
            //k 是属性名  对象[k] 获取属性的值
            console.log(k+'-----'+info[k]);
        }
    </script>
</head>
<body>
    
</body>
</html>